<!--#include("header.html")-->
<!--%import("js/select.js")-->
<!--%import("js/toggle.js")-->
	<!-- #issueBody -->
	<div id="issueBody">
		<!-- #pxeContent -->
		<div id="pxeContent">
			<div class="pxeHeading">
				<h2>{$lang->project_menus["dispIssuetrackerViewIssue"]}</h2>
			</div>

			<div class="pxeSrch">
				<h3>{sprintf($lang->about_total_count, $page_navigation->total_count)}</h3>
				<form action="{Context::getRequestUri()}" method="get" class="search openSrch">
				<input type="hidden" name="vid" value="{$vid}" />
				<input type="hidden" name="mid" value="{$mid}" />
				<input type="hidden" name="act" value="{$act}" />
				<input type="hidden" name="d" value="1" />
					<fieldset class="basic">
						<legend class="alt">Basic Search</legend>
						<div class="select" style="width:120px;">
							<span class="ctrl"><span class="arrow"></span></span>
							<div class="myValue"></div>
							<ul class="iList">
								<!--@if(!$search_target)-->
								{@ $search_target = "title"; }
								<!--@end-->
								
								<!--@foreach($search_option as $key => $val)-->
								<li><input name="search_target" id="i{$key}" class="option" type="radio" value="{$key}" <!--@if($search_target==$key)-->checked="checked"<!--@end--> /><label for="i{$key}">{$val}</label></li>
								<!--@end-->
							</ul>
						</div>
						<input name="search_keyword" type="text" class="iText" title="Search" value="{$search_keyword}" />
						<span class="btnPxe strong"><input type="submit" value="{$lang->cmd_search}" /></span>
						<button type="button" class="toggleSrch">{$lang->cmd_detailed_search}<span></span></button>
					</fieldset>
					<fieldset class="detail issue">
						<legend class="alt">Detail Search</legend>
						<input type="hidden" name="d_issue_id" value="1" />
						<input type="hidden" name="d_writer" value="1" />
						<div class="item first">
							<h4><label for="plan">{$lang->milestone}</label><input type="checkbox" name="d_milestone" value="1" id="plan" class="iCheck" <!--@if($display_option["milestone"]->checked)-->checked="checked"<!--@end--> /></h4>
							<ul class="sOption">
								<li><input name="milestone_srl" type="radio" value="0" class="iRadio" id="plann" <!--@if(isset($milestone_srl) && $milestone_srl == 0)-->checked="checked"<!--@endif--> /><label for="plann">{$lang->not_assigned}</label></li>
								<!--@foreach($project->milestones as $key => $val)-->
								<li><input name="milestone_srl" type="radio" value="{$val->milestone_srl}" class="iRadio" id="plan{$key}" <!--@if($milestone_srl == $val->milestone_srl)-->checked="checked"<!--@endif-->/><label for="plan{$key}">{$val->title}</label></li>
								<!--@end-->
							</ul>
						</div>
						<div class="item">
							<h4><label for="status">{$lang->status}</label><input type="checkbox" name="d_status" id="status" class="iCheck" value="1" <!--@if($display_option["status"]->checked)-->checked="checked"<!--@end-->/></h4>
							<ul class="sOption">
								{@ $checkArr = array() }
								<!--@if($status)-->
								<!--@foreach($status as $val)-->
								{@ $checkArr[$val] = 1 }	
								<!--@end-->
								<!--@endif-->
								<!--@foreach($lang->status_list as $key=>$val)-->
								<li><input name="status[]" type="checkbox" value="{$key}" class="iCheck" id="status{$key}" <!--@if($checkArr[$key])-->checked="checked"<!--@endif-->/><label for="status{$key}">{$val}</label></li>
								<!--@end-->
							</ul>
						</div>
						<div class="item">
							<h4><label for="priority">{$lang->priority}</label><input type="checkbox" name="d_priority" value="1" id="priority" class="iCheck" <!--@if($display_option["priority"]->checked)-->checked="checked"<!--@end-->/></h4>
							<ul class="sOption">
								<!--@foreach($project->priorities as $key => $val)-->
								<li><input name="priority" type="radio" value="" class="iRadio" id="priority{$key}" /><label for="priority{$key}">{$val->title}</label></li>
								<!--@end-->
							</ul>
						</div>
						<div class="item">
							<h4><label for="type">{$lang->type}</label><input type="checkbox" name="d_type" value="1" id="type" class="iCheck" <!--@if($display_option["type"]->checked)-->checked="checked"<!--@end--> /></h4>
							<ul class="sOption">
								<!--@foreach($project->types as $key => $val)-->
								<li><input name="type" type="radio" value="" class="iRadio" id="type{$key}" /><label for="type{$key}">{$val->title}</label></li>
								<!--@end-->
							</ul>
						</div>
						<div class="item">
							<h4><label for="element">{$lang->component}</label><input type="checkbox" name="d_component" value="1" id="element" class="iCheck" <!--@if($display_option["component"]->checked)-->checked="checked"<!--@end--> /></h4>
							<ul class="sOption">
								<!--@foreach($project->components as $key=>$val)-->
								<li><input name="component" type="radio" value="" class="iRadio" id="component{$key}" /><label for="component{$key}">{$val->title}</label></li>
								<!--@end-->
							</ul>
						</div>
						<div class="item">
							<h4><label for="package">{$lang->package}</label><input type="checkbox" name="d_package" id="package" class="iCheck" value="1" <!--@if($display_option["package"]->checked)-->checked="checked"<!--@end-->/></h4>
							<ul class="sOption">
								<!--@foreach($project->packages as $key => $val)-->
								<li><input name="package_srl" type="radio" value="{$val->package_srl}" class="iRadio" id="package{$key}" onclick="package_releases(this, '{$val->package_srl}');" <!--@if($val->package_srl==$package_srl)-->checked="checked"<!--@endif--> /><label for="package{$key}">{$val->title}</label></li>
								<!--@end-->
							</ul>
						</div>
						<div class="item">
							<input type="hidden" id="current_package" value="" />
							<h4><label for="version">{$lang->occured_version}</label><input type="checkbox" name="d_occured_version" value="1" id="version" class="iCheck" <!--@if($display_option["occured_version"]->checked)-->checked="checked"<!--@end--> /></h4>
							<ul class="sOption" id="releases">
								<!--@if($package_srl)-->
									<!--@foreach($project->releases as $k => $v)-->
									<!--@if($v->package_srl == $package_srl)-->
									<li><input name="release_srl" type="radio" value="{$v->release_srl}" class="iRadio" id="version{$v->release_srl}" <!--@if($v->release_srl==$release_srl)-->checked="checked"<!--@endif-->/><label for="version{$v->release_srl}">{$v->title}</label></li>
									<!--@end-->
									<!--@end-->
								<!--@endif-->
							</ul>
						</div>
						<div class="item last">
							<h4><label for="charge">{$lang->assignee}</label><input type="checkbox" name="d_assignee" value="1" id="charge" class="iCheck" <!--@if($display_option["assignee"]->checked)-->checked="checked"<!--@end--> /></h4>
							<ul class="sOption">
								<!--@foreach($commiters as $val)-->
								<li><input name="assignee_srl" type="radio" value="{$val->member_srl}" class="iRadio" id="charge{$val->member_srl}" <!--@if($val->member_srl==$assignee_srl)-->checked="checked"<!--@end--> /><label for="charge{$val->member_srl}">{$val->nick_name}</label></li>
								<!--@end-->
							</ul>
						</div>
						<div class="buttonArea">
							<div class="fRight">
								<span class="btnPxe strong"><input type="submit" value="{$lang->cmd_apply}" /></span>
							</div>
						</div>
					</fieldset>
				</form>
			</div>
			
			<form action="">
			<table border="1" cellspacing="0" class="pxeT3">
				<thead>
					<tr>
					{@ $nCols = 0; }
					<!--@foreach($display_option as $k => $v)-->
					<!--@if($v->checked)--><th scope="col">{$v->title}</th>{@ $nCols += 1; }<!--@end-->
					<!--@end-->
					<!--@if($grant->is_admin)--><th><input type="checkbox" onclick="XE.checkboxToggleAll({ doClick:true }); return false;" /></th>{@ $nCols += 1; }<!--@end-->
					</tr>
				</thead>
				<tbody>
				<!--@if($page_navigation->total_count == 0)-->
				<tr>
					<td colspan="{$nCols}">
						<p>{$lang->noissue}</p>
					</td>
				</tr>
				<!--@end-->
				<!--@foreach($issue_list as $val)-->
				<tr>
				<!--@foreach($display_option as $k => $v)-->
					<!--@if($v->checked)-->
						<!--@if($k == 'issue_id')-->
						<td>#{$val->get('document_srl')}</td>
						<!--@elseif($k == 'status')-->
						<td><em class="status {$val->get('status')}">{$val->getStatus()}</em></td>
						<!--@elseif($k == 'title')-->
						<td class="title"><a href="{getUrl('document_srl',$val->get('document_srl'))}">{$val->getTitle()}</a>
							{$val->printExtraImages(60*60*24)}
							<!--@if($val->getCommentCount())-->
							<strong class="comment">{$val->getCommentCount()}</strong>
							<!--@endif-->
							<!--@if($val->getTrackbackCount())-->
							<strong class="trackback">{$val->getTrackbackCount()}</strong>
							<!--@endif-->
						</td>
						<!--@elseif($k == 'milestone')-->
						<td>{$val->getMilestoneTitle()}</td>
						<!--@elseif($k == 'priority')-->
						<td>{$val->getPriorityTitle()}</td>
						<!--@elseif($k == 'type')-->
						<td>{$val->getTypeTitle()}</td>
						<!--@elseif($k == 'component')-->
						<td>{$val->getComponentTitle()}</td>
						<!--@elseif($k == 'occured_version')-->
						<td>{$val->getOccuredVersionTitle()}</td>
						<!--@elseif($k == 'package')-->
						<td>{$val->getPackageTitle()}</td>
						<!--@elseif($k == 'assignee')-->
						<td><!--@if($val->get('assignee_srl'))--><span class="member_{$val->get('assignee_srl')}">{$val->get('assignee_name')}</span><!--@else-->&nbsp;<!--@endif--></td>
						<!--@elseif($k == 'writer')-->
						<td>
							<!--@if($val->get('member_srl'))-->
							<span class="member_{$val->get('member_srl')}">{$val->getNickName()}</span>
							<!--@else-->
							{$val->getNickName()}
							<!--@end-->
							<span class="time">{$val->getRegdate("Y.m.d")}</span>
						</td>
						<!--@else-->
						<td></td>
						<!--@end-->
					<!--@endif-->
				<!--@endif-->
				<!--@if($grant->is_admin)--><td><input type="checkbox" name="cart" value="{$val->document_srl}" onclick="doAddDocumentCart(this);" <!--@if($val->isCarted())-->checked="checked"<!--@end-->/></td><!--@end-->
				</tr>
				<!--@endif-->
				</tbody>
				
			</table>

				<div class="buttonArea">
					<div class="fRight">
						<!--@if($grant->is_admin)-->
						<span class="btnPxe">
						<a href="{getUrl('','module','document','act','dispDocumentManageDocument')}" onclick="popopen(this.href,'manageDocument'); return false;">{$lang->cmd_manage_document}</a>
						</span>
						<span class="btnPxe">
						<a href="{getUrl('act','dispIssuetrackerAdminManageDocument')}" onclick="popopen(this.href,'manageDocument'); return false;">{$lang->cmd_manage_issue}</a>
						</span>
						<!--@end-->
						<span class="btnPxe strong"><a href="{getUrl('act','dispIssuetrackerNewIssue')}">{$lang->cmd_new_issue}</a></span>
					</div>
				</div>
			
			</form>
			
			<div class="pagination">
				<!--@if($page != 1)-->
				<a href="{getUrl('page','','document_srl','','division',$division,'last_division',$last_division)}" class="direction">&lsaquo; {$lang->first_page}</a> 
				<!--@end-->
				<!--@while($page_no = $page_navigation->getNextPage())-->
					<!--@if($page == $page_no)-->
					<strong>{$page_no}</strong>
					<!--@else-->
					<a href="{getUrl('page',$page_no,'document_srl','','division',$division,'last_division',$last_division)}">{$page_no}</a>
					<!--@end-->
				<!--@end-->
				<!--@if($page < $page_navigation->last_page)--> 
				<a href="{getUrl('page',$page_navigation->last_page,'document_srl','','division',$division,'last_division',$last_division)}" class="direction">{$lang->last_page} &rsaquo;</a>
				<!--@end-->
			</div>

		</div>
		<!-- /#pxeContent -->
		
	</div>
	<!-- /#issueBody -->
<div style="display:none;">
<!--@foreach($project->packages as $key => $val)-->
<ul class="sOption" id="release_{$val->package_srl}">
    <!--@foreach($project->releases as $k => $v)-->
    <!--@if($val->package_srl == $v->package_srl)-->
	<li><input name="release_srl" type="radio" value="{$v->release_srl}" class="iRadio" id="version{$v->release_srl}" /><label for="version{$v->release_srl}">{$v->title}</label></li>
    <!--@end-->
    <!--@end-->
</ul>
<!--@end-->
</div>
<!--#include('footer.html')-->
